﻿// lindexi
// 10:52

using ModelClassLibrary;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236

namespace SplitViewOptions.BusinessControl
{
    public sealed partial class FilpViewUserControl : UserControl
    {
        public FilpViewUserControl()
        {
            this.InitializeComponent();
            Getdata();
        }

        private void Getdata()
        {
            List<Helpersource> resulist = new List<Helpersource>();
            List<List<Info>> listttatsdf = new List<List<Info>>();
            List<Info> onelist = new List<Info>
            {
                new Info()
                {
                    text = "百度",
                    dataurl = "https://www.baidu.com/"
                }
            };
            Helpersource onehelp = new Helpersource()
            {
                Header = "1",
                Items = onelist
            };
            resulist.Add(onehelp);
            List<Info> twolist = new List<Info>
            {
                new Info()
                {
                    text = "百度",
                    dataurl = "https://www.baidu.com/"
                },
                new Info()
                {
                    text = "百度",
                    dataurl = "https://www.baidu.com/"
                }
            };
            Helpersource teohelp = new Helpersource()
            {
                Header = "1",
                Items = twolist
            };
            resulist.Add(teohelp);
            List<Info> therelist = new List<Info>
            {
                new Info()
                {
                    text = "百度",
                    dataurl = "https://www.baidu.com/"
                },
                new Info()
                {
                    text = "百度",
                    dataurl = "https://www.baidu.com/"
                },
                new Info()
                {
                    text = "百度",
                    dataurl = "https://www.baidu.com/"
                }
            };
            Helpersource threehelp = new Helpersource()
            {
                Header = "1",
                Items = therelist
            };
            resulist.Add(threehelp);
            listttatsdf.Add(onelist);
            listttatsdf.Add(twolist);
            flipView.ItemsSource = listttatsdf;
        }

        private class Helpersource
        {
            public string Header
            {
                get;
                set;
            }

            public List<Info> Items
            {
                get;
                set;
            }
        }
    }
}